
Page({


  data: {

  },


  onLoad: function (options) {

  },

  chooseAddress(){
    var that = this;
    wx.chooseLocation({
      success(res){
        console.log(res)
        
        that.setData({
          localtion:res.address + res.name,
          addresssInfo:res
        })

        if(res.address==""){
          that.setData({
            localtion:"请选择位置"
          })
        }
      }
    })
  },
  copy1(){
    wx.setClipboardData({
      data: this.data.addresssInfo.latitude + ''
    })
  },
  copy2(){
    wx.setClipboardData({
      data: this.data.addresssInfo.longitude + ''
    })
  },
  copy3(){
    wx.setClipboardData({
      data: this.data.localtion + ''
    })
  }
})